home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
ATTN.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
3KB
|
81 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_Attn( cMessage, aOptions, cColor, nRowMod, nColMod ) --> nChoice
PARAMETERS:
cMessage : Message to display
aOptions : Array of Options to choose from
cColor : Color Scheme to use for box and text
(Default: setcolor())
nRowMod : Row Offset from Center (Default: 0)
nColMod : Col Offset from Center (Default: 0)
SHORT:
Replacement for Clipper's Alert() with additional control.
DESCRIPTION:
_Attn() is (with a few exceptions, and a few additions) is a replacement for
the Clipper Alert() function, allowing for several options including color
and positioning. The syntax of alert() is compatible, however. The only
syntax differences come in the expanded capabilities (ie, arguments beyond
cMessage and aOptions).
Differences from Alert(): No TTY-Mode drawing is used, ie, standard
@..Say..Get screen writing is employed. _Attn() will allow more than four
aOption elements (Alert() ignores any beyond the fourth). _Attn() will
ignore NIL and empty elements (Alert() acts strangely when NIL elements are
given).
Similarities to Alert(): if the number of lines in cMessage will not fit on
the screen in the current screen mode, the results are unpredictable.
_Attn() saves and restores it's screen area.
cMessage may be omitted or specified as empty. The result will be an box
with only the aOptions choices and no message.
If the string contains semicolons, each string so delimited is centered
on successive lines of the box.
aOptions is an array of strings to display as choices. If not specified,
a single "Ok" message is displayed (and obviously will always return 1).
No checking is attempted to see if all options will fit across the screen.
If you specify them, they're going up.
cColor is a standard Clipper Color scheme string. If it is not
specified, them the current color setting is used.
nRowMod and nColMod are offsets from center. That is, the box coordinates
are first centered to fit the current screen mode, and then nRowMod
and nColMod are ADDED to the TOP LEFT corner coordinates to move the
box accordingly. For instance, to move the box DOWN and/or to the
RIGHT, specify a positive number. To move the box either UP or to the
LEFT, specify negative values.
_Attn(cMessage, aOptions, cColor, -5, -10): this would display the box
five rows UP from center, and 10 columns LEFT from center.
NOTE:
EXAMPLE:
_Attn('Pick something from the list', {"This","That","The","Other","Else"},
'w+/b,n/w,,,gr+/g")
In this example, the row and column modifiers are not specified, so the
_Attn() box is centered in the display screen.
******************************************************************************/